3.2524 \(\int x^{-1+n} \left (a+b x^n\right )^2 \, dx\)

Optimal. Leaf size=19 \[ \frac{\left (a+b x^n\right )^3}{3 b n} \]

[Out]

(a + b*x^n)^3/(3*b*n)

_______________________________________________________________________________________

Rubi [A]  time = 0.0194742, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067 \[ \frac{\left (a+b x^n\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]  Int[x^(-1 + n)*(a + b*x^n)^2,x]

[Out]

(a + b*x^n)^3/(3*b*n)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.43293, size = 12, normalized size = 0.63 \[ \frac{\left (a + b x^{n}\right )^{3}}{3 b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**(-1+n)*(a+b*x**n)**2,x)

[Out]

(a + b*x**n)**3/(3*b*n)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0111226, size = 19, normalized size = 1. \[ \frac{\left (a+b x^n\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]  Integrate[x^(-1 + n)*(a + b*x^n)^2,x]

[Out]

(a + b*x^n)^3/(3*b*n)

_______________________________________________________________________________________

Maple [B]  time = 0.023, size = 42, normalized size = 2.2 \[{\frac{{a}^{2}{{\rm e}^{n\ln \left ( x \right ) }}}{n}}+{\frac{ab \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{n}}+{\frac{{b}^{2} \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{3\,n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^(-1+n)*(a+b*x^n)^2,x)

[Out]

a^2/n*exp(n*ln(x))+a*b/n*exp(n*ln(x))^2+1/3*b^2/n*exp(n*ln(x))^3

_______________________________________________________________________________________

Maxima [A]  time = 1.43268, size = 23, normalized size = 1.21 \[ \frac{{\left (b x^{n} + a\right )}^{3}}{3 \, b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^2*x^(n - 1),x, algorithm="maxima")

[Out]

1/3*(b*x^n + a)^3/(b*n)

_______________________________________________________________________________________

Fricas [A]  time = 0.225397, size = 43, normalized size = 2.26 \[ \frac{b^{2} x^{3 \, n} + 3 \, a b x^{2 \, n} + 3 \, a^{2} x^{n}}{3 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^2*x^(n - 1),x, algorithm="fricas")

[Out]

1/3*(b^2*x^(3*n) + 3*a*b*x^(2*n) + 3*a^2*x^n)/n

_______________________________________________________________________________________

Sympy [A]  time = 8.79257, size = 37, normalized size = 1.95 \[ \begin{cases} \frac{a^{2} x^{n}}{n} + \frac{a b x^{2 n}}{n} + \frac{b^{2} x^{3 n}}{3 n} & \text{for}\: n \neq 0 \\\left (a + b\right )^{2} \log{\left (x \right )} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**(-1+n)*(a+b*x**n)**2,x)

[Out]

Piecewise((a**2*x**n/n + a*b*x**(2*n)/n + b**2*x**(3*n)/(3*n), Ne(n, 0)), ((a +
b)**2*log(x), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.214922, size = 43, normalized size = 2.26 \[ \frac{b^{2} x^{3 \, n} + 3 \, a b x^{2 \, n} + 3 \, a^{2} x^{n}}{3 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^2*x^(n - 1),x, algorithm="giac")

[Out]

1/3*(b^2*x^(3*n) + 3*a*b*x^(2*n) + 3*a^2*x^n)/n